/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package reflect;

import java.util.logging.*;

/**
 *
 * @author Administrator
 */
public class HelloProxy implements HelloSpeak{

    private HelloSpeak helloSpeak;

    public HelloProxy(HelloSpeak helloSpeak) {
        this.helloSpeak = helloSpeak;
    }
    
    public void hello(String name){
    
        log("hello()方法开始");
        helloSpeak.hello(name);
        log("hello方法结束");
    }
    
    private void log(String msg){
    
        Logger.getLogger(HelloProxy.class.getName()).log(Level.INFO, msg);
    }
}
